package Units;

public abstract class Unit {

	protected int _health;
	protected int _minDamage;
	protected int _maxDamage;
	private int _tag;
	
	public int dealDamage(){
		return 0;
	}
	
	/**
	 * @param damage the amount of damage dealt to the unit
	 * @return flag whether the unit dies or not
	 */
	public boolean recieveDamage(int damage){
		_health -= damage;
		if(_health <= 0)
			return true;
		return false;
	}
	
	public int getHealth(){
		return _health;
	}
	
	protected void setTag(int tag){
		_tag = tag;
	}
	
	public int getTag(){
		return _tag;
	}
}
